Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always install into a python venv in ci containers #12663

Merged
merged 2 commits into from
Sep 12, 2022

Conversation

areusch
Copy link
Contributor

@areusch areusch commented Aug 31, 2022

This PR changes all ci_ to install TVM Python dependencies in a virtualenv separate from the system Python dependencies. This PR sets the stage for adding the poetry-based dependency generator to the CI container build process.

@areusch areusch force-pushed the tvm-venvs branch 2 times, most recently from 8b2922d to 89f9a53 Compare August 31, 2022 20:05
@areusch
Copy link
Contributor Author

areusch commented Aug 31, 2022

Addresses #12608

@areusch areusch force-pushed the tvm-venvs branch 2 times, most recently from 02c0eb7 to 16bff01 Compare September 1, 2022 23:46
@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2022

Built docs for commit 16bff01 can be found here.

@areusch areusch marked this pull request as ready for review September 2, 2022 14:18
@areusch
Copy link
Contributor Author

areusch commented Sep 2, 2022

@driazati @mehrdadh @leandron PTAL

@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -eux
# Licensed to the Apache Software Foundation (ASF) under one
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, rm this file and freeze_deps.py, they are part of a follow-on


COPY install/ubuntu_install_cmake_source.sh /install/ubuntu_install_cmake_source.sh
# Globally disable pip cache
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Globally disable pip cache

@@ -0,0 +1,3 @@
pip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are there separate requirements.txts per Python version?

lsb-core

release=$(lsb_release -sc)
if [ "${release}" == "bionic" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we use miniconda instead of the distribution's Python + venv? The end result would be the same but we would be able to say "we use version X of Python in CI" instead of "it depends"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I was migrating teams off of conda I used pyenv which would compose into our system with Poetry?

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2022

The list below shows some tests that ran in main 546a7da but were skipped in the CI build of 5775327:

test: Cortex_M -> ctypes.tests.micro.zephyr.test_zephyr#test_rpc_large_array[mps3_an547-(16*1024)]
test: Cortex_M -> ctypes.tests.micro.zephyr.test_zephyr_aot_exec#test_aot_executor[mps3_an547]
test: Cortex_M -> ctypes.tests.micro.zephyr.test_zephyr_aot_exec#test_relay[mps3_an547]

A detailed report of ran tests is here.

@areusch
Copy link
Contributor Author

areusch commented Sep 9, 2022

@driazati i think this is finally ready

@leandron
Copy link
Contributor

leandron commented Sep 9, 2022

Im hopeful that #12738 will be merged once CI gets green. Happy to merge this just after that.

@areusch
Copy link
Contributor Author

areusch commented Sep 9, 2022

@leandron happy to hold off til then

Copy link
Member

@mehrdadh mehrdadh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and thanks for working on this!
I'll wait for others to review

Copy link
Contributor

@leandron leandron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, lets merge this improvements before CI gets stale.

@leandron leandron merged commit a047e02 into apache:main Sep 12, 2022
@leandron
Copy link
Contributor

Merged. Thanks @areusch @driazati @mehrdadh

ashutosh-arm added a commit to ashutosh-arm/tvm that referenced this pull request Sep 14, 2022
Following change introduced installing python dependencies inside
virtual environments: apache#12663
Previous to this fix, a different version of python was being
picked up that didn't catch the issues fixed in this commit.

Change-Id: Ie290d9474a799311e07d293fa1b8299326b11661
leandron pushed a commit that referenced this pull request Sep 14, 2022
Following change introduced installing python dependencies inside
virtual environments: #12663
Previous to this fix, a different version of python was being
picked up that didn't catch the issues fixed in this commit.

Change-Id: Ie290d9474a799311e07d293fa1b8299326b11661
driazati pushed a commit that referenced this pull request Sep 16, 2022
Recently virtual environments were introduced in the
docker images which was a great contribution to
localize errors: #12663. In this fix, link to the caffe is
created inside this virtual env instead of adding it
to the system path of python. This fix also removes
importing request package where not needed.

Fixes #12663
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
This PR changes all ci_ to install TVM Python dependencies in a
virtualenv separate from the system Python dependencies.

 Sets the stage for adding the poetry-based dependency
generator to the CI container build process.

* Always install into a python venv in ci containers.
* Respect Dockerfile ENV PATH modifications in
docker/bash.sh lookups.
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
)

Following change introduced installing python dependencies inside
virtual environments: apache#12663
Previous to this fix, a different version of python was being
picked up that didn't catch the issues fixed in this commit.

Change-Id: Ie290d9474a799311e07d293fa1b8299326b11661
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
Recently virtual environments were introduced in the
docker images which was a great contribution to
localize errors: apache#12663. In this fix, link to the caffe is
created inside this virtual env instead of adding it
to the system path of python. This fix also removes
importing request package where not needed.

Fixes apache#12663
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants